package com.qd.common.panda.domain.entity.card.third;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 第三方券商
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class ThirdPartyDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "编码不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "编码长度不能超过{max}位", groups = DefaultGroup.class)
    private String code;
    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "名称长度不能超过{max}位", groups = DefaultGroup.class)
    private String name;
    /**
     * 小程序ID
     */
    @Size(max = 128, message = "小程序ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String appid;
    /**
     * 跳转地址
     */
    @Size(max = 200, message = "跳转地址长度不能超过{max}位", groups = DefaultGroup.class)
    private String redirectUrl;
    /**
     * 参数
     */
    @Size(max = 500, message = "参数长度不能超过{max}位", groups = DefaultGroup.class)
    private String params;
    /**
     * 添加时间
     */
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
    /**
     * 应用分类
     */
    @NotBlank(message = "应用分类不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "应用分类长度不能超过{max}位", groups = DefaultGroup.class)
    private String appCategory;
    /**
     * 应用分类显示
     */
    private String appCategoryDisplay;
    /**
     * 参数类型
     */
    @Size(max = 50, message = "参数类型长度不能超过{max}位", groups = DefaultGroup.class)
    private String paramType;
    /**
     * 参数类型显示
     */
    private String paramTypeDisplay;
    /**
     * 操作人
     */
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 操作人显示
     */
    private String operatorDisplay;
    /**
     * 机构ID
     */
    @Size(max = 50, message = "机构ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orgId;
    /**
     * 机构ID显示
     */
    private String orgIdDisplay;

    @Override
    public void freeData() {
        this.code = null;
        this.name = null;
        this.redirectUrl = null;
        this.params = null;
        this.addTime = null;
        this.updateTime = null;
        this.appCategory = null;
        this.appCategoryDisplay = null;
        this.paramType = null;
        this.paramTypeDisplay = null;
        this.operator = null;
        this.operatorDisplay = null;
        this.orgId = null;
        this.orgIdDisplay = null;
        super.freeData();
    }
}
